package com.nut.spp.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.nut.spp.entity.SysRegion;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;

@Mapper
public interface SysRegionMapper extends BaseMapper<SysRegion> {

    @Select("select id,pid,name,type,code from sys_region where pid=#{pid}")
    List<SysRegion> selectByPid(Integer pid);

    @Select("select id,pid,name,type,code from sys_region where code=#{code}")
    List<SysRegion> selectByCode(Integer code);

}